//
//  OneViewController.m
//  wyzv1503
//
//  Created by 董华昊 on 16/9/13.
//  Copyright © 2016年 HuaHaoDong. All rights reserved.
//

#import "OneViewController.h"

@interface OneViewController ()

@end

@implementation OneViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    for (int i = 0; i< 20; i++) {
        UIButton *button  = [UIButton buttonWithType:UIButtonTypeSystem];
        
        CGFloat w  = 50;
        CGFloat h = 50;
        CGFloat x = i * 50;
        CGFloat y = i*20;
        
        [button setTitle:[NSString stringWithFormat:@"%d",i] forState:UIControlStateNormal];
        [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        
        
        button.frame = CGRectMake(x, y, w, h);
        
        [self.view addSubview:button];
        //111
    }
    NSLog(@"SR");

}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
